<template>
  <div class="home">
    <h2>我是 Home 页面</h2>
    <MyFacther></MyFacther>
    <RefChild ref="mychild"></RefChild>
  </div>
</template>

<script>
import MyFacther from '../components/MyFacther.vue'
import RefChild from '../components/RefChild.vue'
export default {
  name: 'home',
  components: {
    MyFacther,
    RefChild
  },
  mounted(){
    console.log(this.$refs.mychild);
    console.log(this.$refs.mychild.msg);
    this.$refs.mychild.changeMsg();
  }
}
</script>
